.mega-top-menu,
.rtl .mega-top-menu {
    position: relative;
    transform: none;
    top: 0 !important;
    height: 100% !important;
    opacity: 1;
    pointer-events: all;
    width: 286px;
    max-width: 400px;
}
.rtl .mega-top-menu {
    direction: rtl;
}
.mega-top-menu .top-nav .home {
    display: flex;
    width: auto;
    height: 40px;
    pointer-events: none;
    text-decoration: none;
}
.mega-top-menu .top-nav .home.nav-elem span {
    font: var(--mobile-font-heading-h1);
    text-decoration: none;
}
.mega-top-menu .top-nav,
.mega-top-menu .menu {
    background-color: var(--mobile-surface-1);
}
.mega-top-menu .top-nav .close,
.mega-top-menu nav.menu > * {
    display: none;
}
.mega-top-menu.drive nav.menu > *.drive,
.mega-top-menu.pwm nav.menu > *.pwm,
.mega-top-menu.folderlink nav.menu > *.root-folder {
    display: flex;
}

/* This is hidden tree for using on copy/move dialog */
.mega-top-menu nav.menu > .hidden-tree > .tree-expander,
.mega-top-menu nav.menu > .hidden-tree > .content-panel.shared-with-me {
    display: none;
}
.mega-top-menu .menu {
    overflow-y: auto;
}
.mega-top-menu .menu.ps.ps--active-x > .ps__rail-x {
    margin-inline-end: 10px;
}
.mega-top-menu .menu.ps.ps--active-x.ps--active-y > .ps__rail-x {
    margin-inline-end: 20px;
}
.mega-top-menu .menu .ps__rail-y {
    right: 12px;
}
.rtl .mega-top-menu .menu .ps__rail-y {
    right: 0;
}
.mega-top-menu:not(.drive):not(.root-folder) .menu > .nav-elem:not(.drive):not(.root-folder):last-of-type {
    margin-top: auto;
}
.mega-top-menu .menu .nav-elem:nth-last-child(2) {
    margin-top: 0;
}
.mega-top-menu .menu .nav-elem span {
    white-space: nowrap;
    text-overflow: ellipsis;
}
.mega-top-menu .menu .nav-elem.active span {
    font-weight: var(--mobile-font-weight-bold);
}
.mega-top-menu .nav-elem.button span.primary-text {
    text-align: start;
}
.mega-top-menu .menu .spacer {
    flex-basis: 12px;
    flex-shrink: 1;
    min-height: 6px;
}
.mega-top-menu .menu.ps--active-y .spacer {
    min-height: 12px;
}
.mega-top-menu nav.menu button.tree-expander.icon-only {
    padding: 0;
    background-color: transparent;
    position: absolute;
    left: 8px;
    top: 20px;
    transform: rotateZ(-90deg);
    cursor: pointer;
    height: auto;
}
.mega-top-menu nav.menu :not(.js-s4-tree-panel) button.tree-expander.icon-only {
    display: none;
}
.mega-top-menu nav.menu .contains-tree button.tree-expander.icon-only {
    display: inline-flex;
}
.rtl .mega-top-menu nav.menu button.tree-expander.icon-only {
    left: auto;
    right: 8px;
    transform: rotateZ(90deg);
}
.mega-top-menu nav.menu button.tree-expander.icon-only.expanded {
    transform: none;
}
.mega-top-menu .storage-block {
    width: 100%;
    flex-shrink: 0;
}
.mega-top-menu .storage-usage {
    padding: 0;
    height: auto;
    bottom: 0;
    background-color: var(--mobile-surface-1);
}
.mega-top-menu .nav-elem:not(.active):active {
    background-color: initial;
}
.mega-top-menu button {
    cursor: pointer;
}
.mega-top-menu .menu .nav-elem.full-width {
    min-width: 100%;
    padding-inline-end: 0;
    width: auto;
}
.mega-top-menu .menu.ps--active-x .nav-elem.full-width::after,
.mega-top-menu .menu.ps--active-x .nav-elem.full-width .right-badge::before,
.mega-top-menu .nw-fm-tree-item .nw-fm-tree-iconwrap {
    background: var(--surface-tree-iconwrap);
    content: '';
    display: inline-block;
    height: 24px;
    padding-inline-start: 28px;
    position: sticky;
    position: -webkit-sticky;
    margin-inline-start: -4px;
    right: -1px;
    vertical-align: middle;
}
.mega-top-menu .nw-fm-tree-item .nw-fm-tree-iconwrap > * {
    display: none;
}
.mega-top-menu .menu .nav-elem.full-width:hover::after,
.mega-top-menu .menu .nav-elem.full-width:hover .right-badge::before,
.mega-top-menu .nw-fm-tree-item:hover .nw-fm-tree-iconwrap {
    background: var(--surface-tree-iconwrap-hover);
}
.mega-top-menu .menu .nav-elem.full-width:active::after,
.mega-top-menu .menu .nav-elem.full-width:active .right-badge::before,
.mega-top-menu .nw-fm-tree-item .nw-fm-tree-iconwrap:active {
    background: var(--surface-tree-iconwrap);
}
.mega-top-menu .menu .nav-elem.active.full-width::after,
.mega-top-menu .menu .nav-elem.full-width.active .right-badge::before,
.mega-top-menu .nw-fm-tree-item.selected .nw-fm-tree-iconwrap {
    background: var(--surface-tree-iconwrap-active);
}
.rtl .mega-top-menu .menu .nav-elem.full-width::after,
.rtl .mega-top-menu .menu .nav-elem.full-width .right-badge::before,
.rtl .mega-top-menu .nw-fm-tree-item .nw-fm-tree-iconwrap {
    left: -1px;
    right: auto;
    background: var(--surface-tree-iconwrap-rtl);
}
.rtl .mega-top-menu .menu .nav-elem.full-width:hover::after,
.rtl .mega-top-menu .menu .nav-elem.full-width:hover .right-badge::before,
.rtl .mega-top-menu .nw-fm-tree-item:hover .nw-fm-tree-iconwrap {
    background: var(--surface-tree-iconwrap-hover-rtl);
}
.rtl .mega-top-menu .menu .nav-elem.full-width:active::after,
.rtl .mega-top-menu .menu .nav-elem.full-width:active .right-badge::before,
.rtl .mega-top-menu .nw-fm-tree-item .nw-fm-tree-iconwrap:active {
    background: var(--surface-tree-iconwrap-rtl);
}
.rtl .mega-top-menu .menu .nav-elem.active.full-width::after,
.rtl .mega-top-menu .menu .nav-elem.active.full-width .right-badge::before,
.rtl .mega-top-menu .nw-fm-tree-item.selected .nw-fm-tree-iconwrap {
    background: var(--surface-tree-iconwrap-active-rtl);
}
.mega-top-menu .menu .nav-elem.full-width .right-badge {
    order: 0;
    position: sticky;
    right: 16px;
    z-index: 1;
}
.mega-top-menu .menu.ps--active-x .nav-elem.full-width .right-badge::before {
    padding-inline-start: 24px;
    position: absolute;
    right: 100%;
    top: 0;
}
.rtl .mega-top-menu .menu .nav-elem.full-width .right-badge {
    left: 16px;
    right: auto;
}
.rtl .mega-top-menu .menu .nav-elem.full-width .right-badge::before {
    left: 100%;
    right: auto;
}

.mega-top-menu .top-nav .small-menu-btn {
    background: transparent;
    color: var(--mobile-icon-primary);
}
.mega-top-menu .top-nav .small-menu-btn:active,
.mega-top-menu .top-nav .small-menu-btn:hover {
    background: var(--mobile-button-disabled);
}
.mega-top-menu.small-resize-pane .top-nav .home .text-box-wrapper,
.mega-top-menu.small-resize-pane .menu .content-panel.active,
.mega-top-menu.small-resize-pane nav.menu button.tree-expander.icon-only,
.mega-top-menu.small-resize-pane .menu .menu-item .text-box-wrapper,
.mega-top-menu.small-resize-pane .menu .ps__rail-x,
.mega-top-menu.small-resize-pane .storage-block .storage-usage-panel .title-block,
.mega-top-menu.small-resize-pane .storage-block .storage-usage-panel .storage-graph,
.mega-top-menu.small-resize-pane .storage-block .storage-usage-panel .loader,
.mega-top-menu.small-resize-pane .storage-block .storage-usage-panel .info a.upgrade .text-box-wrapper,
.mega-top-menu.small-resize-pane .storage-block .lp-storage-information-popup,
.mega-top-menu.small-resize-pane .storage-block .storage-usage-panel .achieve-link,
.mega-top-menu.small-resize-pane .menu .menu-item .right-badge {
    display: none;
}
.mega-top-menu.small-resize-pane .top-nav {
    flex-direction: column;
    flex-wrap: wrap;
    padding: 24px 0;
}
.mega-top-menu.small-resize-pane .top-nav::after {
    content: '';
    background: rgba(217, 217, 217, 1);
    height: 1px;
    margin-inline: auto;
    position: relative;
    bottom: -12px;
    width: 40px;
}
.mega-top-menu.small-resize-pane .top-nav .home {
    width: 100%;
}
.mega-top-menu.small-resize-pane .top-nav .home i {
    margin: 0;
}
.mega-top-menu.small-resize-pane .top-nav .small-menu-btn {
    margin-inline: auto;
}
.mega-top-menu.small-resize-pane .menu .menu-item {
    justify-content: center;
    padding: 16px 0;
}
.mega-top-menu.small-resize-pane .menu .menu-item i {
    margin-inline-end: 4px;
}
.mega-top-menu.small-resize-pane .storage-block .storage-usage-panel .info {
    margin-inline: auto;
}
.mega-top-menu.small-resize-pane .storage-block .storage-usage-panel .info::before {
    content: '';
    display: block;
    background: rgba(217, 217, 217, 1);
    height: 1px;
    margin-inline: auto;
    position: relative;
    top: -16px;
    width: 40px;
}
.mega-top-menu.small-resize-pane .storage-block .storage-usage-panel .info a.upgrade {
    height: 40px;
    padding: 0;
    width: 40px;
}
.mega-top-menu.small-resize-pane .storage-block .storage-usage-panel .info a.upgrade i {
    display: block;
}
.dark-direct-tooltip.simpletip-tooltip.small-sidebar-tip,
.dark-direct-tooltip.simpletip-tooltip.small-sidebar-tip .tooltip-arrow,
.dark-direct-tooltip.simpletip-tooltip.small-sidebar-tip-vis .tooltip-arrow {
    display: none;
}
.small-lhp .dark-direct-tooltip.simpletip-tooltip.small-sidebar-tip,
.dark-direct-tooltip.simpletip-tooltip.small-sidebar-tip-vis {
    display: block;
    background: var(--mobile-background-inverse);
    color: var(--mobile-text-inverse);
    font: var(--mobile-font-caption-large-regular);
    padding: 12px;
    line-height: 14px;
}
